Imports Sys = System
Imports Tex = System.Text

Namespace Enhancements.Core.Logging
    ''' <summary>Base class for all possible FileSystemWriter configuration types. It is not intended for the common developer to inherit from it.</summary>
    <DebuggerStepThrough()> _
    Public MustInherit Class FileSystemWriterConfiguration
        Inherits WriterConfiguration

        Protected Friend Sub New()
        End Sub
        ''' <summary> </summary>
        ''' <param name="_folder"> </param>
        ''' <param name="_deleteOnStartup"> </param>
        Protected Friend Sub New(ByVal _folder As System.String, ByVal _deleteOnStartup As System.Boolean)
            Folder = _folder
            DeleteOnStartup = _deleteOnStartup
        End Sub

        Private __Folder As System.String = TokenPath.TemporaryUserFolder.Value
        ''' <summary>Gets the folder used by the instance. It can encapsulate TokenPath instances. The default value is 'TokenPath.TemporaryUserFolder.Value'.</summary>
        ''' <exception cref="IsNullException">The value is null (while setting).</exception>
        ''' <exception cref="IsPathValidNotException">The value is invalid (while setting).</exception>
        Public Property Folder() As System.String
            Get
                Return __Folder
            End Get
            Private Set(ByVal _value As System.String)
                ___Assert.___IsNullNot("Folder._value", _value, True)
                ___Assert.___IsPathValid("Folder.TokenPath.___RemoveAllOccurrences(_value)", TokenPath.___RemoveAllOccurrences(_value), True)

                __Folder = _value
            End Set
        End Property

        Private __DeleteOnStartup As System.Boolean = False
        ''' <summary>Gets the value that defines whether existing file or files should be deleted on initialization.</summary>
        Public Property DeleteOnStartup() As System.Boolean
            Get
                Return __DeleteOnStartup
            End Get
            Private Set(ByVal _value As System.Boolean)
                __DeleteOnStartup = _value
            End Set
        End Property

    End Class
End Namespace
